<template>
  <div class="goods">
   <el-breadcrumb separator="/">
      <el-breadcrumb-item :to="{ path: '/Home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>用户管理</el-breadcrumb-item>
      <el-breadcrumb-item>用户列表</el-breadcrumb-item>
  </el-breadcrumb>
    <!-- input框 -->
   <el-input placeholder="请输入内容" v-model='searchV'    class="input-with-select search-input" @keydown.enter.native="searchSs">
        <el-button slot="append" icon="el-icon-search" @click='searchSs'></el-button>
   </el-input>
    <!-- 点击的时候显示新增弹框 -->
        <el-button type="primary" plain>添加用户</el-button>

        <el-table
    class="mt-15"
    :data="goodsList"
    border
    style="width: 100%">
     <el-table-column
     label="编号"
      type="index"
      width="50">
    </el-table-column>
    <el-table-column
      prop="goods_name"
      label="商品名称"
      >
    </el-table-column>
    <el-table-column
      prop="goods_price"
      label="商品价格"
      >
    </el-table-column>
    <el-table-column
      prop="goods_state"
      label="商品状态"
      >
    </el-table-column>
    <el-table-column
      prop="goods_number"
      label="商品重量"
      >
    </el-table-column>
    <el-table-column
      prop="upd_time"
      label="创建时间"
      >
    </el-table-column>
    <el-table-column
      prop="mobile"
      label="操作"
      >
      <!-- 操作按钮部分开始 -->
      <template slot-scope='scope'>
        <!-- 点击把所有的信息传递过去 -->
      <el-button type="primary" icon="el-icon-edit"></el-button>
      <el-button type="success" icon="el-icon-check"></el-button>
      <el-button type="danger" icon="el-icon-delete"></el-button>
      </template>
    </el-table-column>

  </el-table>
      </div>
</template>
<script>
import {getgoodsList} from '@/api'
export default {
  data () {
    return {
      searchV: '',
      goodsList: []
    }
  },
  created () {
    this.initgoodsList()
  },
  methods: {
    searchSs () {

    },
    initgoodsList () {
      getgoodsList({query: '', pagenum: 1, pagesize: 10})
        .then(res => {
          this.goodsList = res.data.goods
        })
    }
  }
}
</script>

<style lang="scss" scoped>
.goods{
  .search-input {
    width: 300px;
}
}

</style>
